package com.hhxy.hash;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class TreeSetTest {
    public static void main(String[] args) {
        List<Student> list = new ArrayList<>();
        list.add(new Student("张三",13,'男'));
        list.add(new Student("张三",13,'男'));
        list.add(new Student("李四",14,'男'));
        list.add(new Student("赵六",16,'女'));
        Collections.sort(list,(o1,o2)->o1.age-o2.age);
        System.out.println(list);
    }
}
